window: cancel unclaimed sequences after GtkEventController::handle_event.
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 21 Sep 2015 12:11:48 +0000 (14:11 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Mon, 21 Sep 2015 12:32:44 +0000 (14:32 +0200)
commite3d21accd090183ba71502e140858f5d7cc500c6
treedf3a89fbf5a7f05abe770ce6620a55d9bf93ec1e
parent6fe44d3320d9f52e9cf8bbeb0ff5d49e8ebd6bc4
window: cancel unclaimed sequences after GtkEventController::handle_event.

To GtkGesture machinery, if an event triggers a controller/gesture signal,
and gesture reset/cancellation as a result, the event has been managed
after all.

Commit e3bd895667 effectively changed the return value of the
wrapping gtk_event_controller_handle_event() function, which broke some
paths (eg. gtk_popover_button_press() wouldn't while the GTK+ grab was
active for this reason because the button press event was consumed early
on gtk_window_check_handle_wm_event()).

That patch is not too off-track given potential child widgets' behavior,
we want nonetheless to distinguish the denied vs cancelled paths here
(because GtkWindow itself relies on the GtkGesture behavior described in
the first paragraph on the begin_move/resize paths), so just reset
gestures after the event has already gone through the GtkEventController
so the return value is unaffected.
gtk/gtkwindow.c